import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.css';
// import '../public/styles.css';
import './tailwind.css';
import { BrowserRouter } from 'react-router-dom';
import zhCN from 'antd/locale/zh_CN';
// Provider包裹根组件App就不需要每个组件都引入store了
import { Provider } from 'react-redux'
import {store,persistor} from './store'
import { PersistGate } from 'redux-persist/integration/react';
import { ConfigProvider } from 'antd';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <Provider store={store}>
    <PersistGate loading={<div>loading Redux...</div>} persistor={persistor}>
      <BrowserRouter>
        <ConfigProvider locale={zhCN}>
          <App />
        </ConfigProvider>
      </BrowserRouter>,
    </PersistGate>
  </Provider> 
);
